<template>
  <div>
        <mt-swipe :auto="4000">
            <mt-swipe-item v-for="item in lunbotuList" :key="item.img">
              <img :src="item.img" class="img1">
            </mt-swipe-item>
        </mt-swipe>
        
         <div class="mui-content">
		        <ul class="mui-table-view mui-grid-view mui-grid-9">
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><router-link to="/news">
		                   <img src="../../img/menu1.png" >
		                    <div class="mui-media-body">新闻咨询</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><router-link to="/photo">
		                    <img src="../../img/menu2.png" >
		                    <div class="mui-media-body">图片专区</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><router-link to="/goods">
		                     <img src="../../img/menu3.png" >
		                    <div class="mui-media-body">商品列表</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <img src="../../img/menu4.png" >
		                    <div class="mui-media-body">新闻咨询</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                     <img src="../../img/menu5.png" >
		                    <div class="mui-media-body">视频专区</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
		                    <img src="../../img/menu6.png" >
		                    <div class="mui-media-body">联系我们</div></a></li>
		            
		        </ul> 
		</div>
  </div>
  

</template>

<script>
  
import axios from 'axios'
import {Toast} from 'mint-ui'
export default {
   data(){
       return{
           lunbotuList:[]//保存轮播图数组
       }
   },
   created() {
       this.getLunbotu();
   },
   methods:{
      async getLunbotu(){
             const {data:res}  =  await this.$http.get('api/getlunbo')
              console.log(res)
               if(res.status==0){
                  Toast('成功')
                  this.lunbotuList=res.message;
             }else{
                  Toast(res.message)
            }
           


        //   axios.get('api/getlunbo').then(res =>{
        //       console.log(res)
        //      if(res.data.status==0){
        //            Toast('成功')
        //           this.lunbotuList=res.data.message;
        //      }else{
        //           Toast(res.data.message)
        //      }
        //   })


       }
   },
}
</script>

<style  scoped>
       .mint-swipe{
         height:200px;
            
      }
      .img1{
           width:100%;
           height:100%;
         }
      .mui-grid-view .mui-grid-9{
          background-color:#fff;
          
      }
     .mui-content .mui-grid-view .mui-grid-9 li{
          padding:0, 20px;
      }
       img{
          width:60%;
          height:60%;
      }

</style>